﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WXYW
{
    public partial class QWXZQBaseonProductProperty : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitialDDL();
                //InitialPage();
            }
        }

        private void InitialDDL()
        {
            for (int startYear = 2010; startYear <= DateTime.Now.Year; startYear++)
            {
                YearDDL.Items.Add(new ListItem(startYear.ToString(), startYear.ToString()));
            }

            for (int month = 1; month <= 12; month++)
            {
                MonthDDL.Items.Add(new ListItem(month.ToString(), month.ToString()));
            }

            YearDDL.SelectedValue = DateTime.Now.Year.ToString();
            MonthDDL.SelectedValue = DateTime.Now.Month.ToString();

            InitialYear();
        }

        private void InitialYear()
        {
            Label1.Text = YearDDL.SelectedValue;
            Label2.Text = YearDDL.SelectedValue;
            Label3.Text = YearDDL.SelectedValue;
            Label4.Text = YearDDL.SelectedValue;
        }

        private void InitialPage()
        {
            throw new NotImplementedException();
        }

        protected void YearDDL_SelectedIndexChanged(object sender, EventArgs e)
        {
            InitialYear();
        }

        protected void MonthDDL_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}
